// --./src/main.js
import { createApp } from 'vue'
import './style.css'
import 'virtual:uno.css';
import App from './App.vue'
import i18nPlugin from './plugins/i18n'
 import router from './router/index.js'
 import dialog from './plugins/dialog'
import VueKonva from 'vue-konva';
import * as ReinSwitch from './components/web-componets/rein-switch.js'
// import {
//     createPinia
// } from 'pinia'
import {createPinia} from './plugins/pinia'

console.log("createPinia",createPinia);
// 全局引入echarts

/* 引入Vant */
import Vant from 'vant'
import 'vant/lib/index.css'

import utils from './utils/util.js'

import config from './config/config.js'
import {
    api
} from './api/api.js' // API 链接

const i18nStrings = { 
    greetings: { hi: 'Hallo!' } 
}

console.log("main.js router:",router);
const app = createApp(App)
app.use(createPinia())
app.use(VueKonva);

app.use(router)
app.use(dialog)
app.use(Vant)
app.use(i18nPlugin,i18nStrings)
//配置全局变量
app.config.globalProperties.$utils = utils;
app.config.globalProperties.$config = config;
app.config.globalProperties.$api = api;
app.mount('#app')
